# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=grsync
pkgver=1.3.0
pkgrel=1
pkgdesc="GTK+ GUI for rsync to synchronize folders, files and make backups"
arch=('loong64' 'x86_64')
url="http://www.opbyte.it/grsync/"
license=('GPL')
depends=('gtk3' 'rsync')
makedepends=('intltool')
source=(http://www.opbyte.it/release/$pkgname-$pkgver.tar.gz
        grsync.appdata.xml
        use-themed-icon.patch)
sha256sums=('b7c7c6a62e05302d8317c38741e7d71ef9ab4639ee5bff2622a383b2043a35fc'
            '5dee994cafbcf8adfda34767cbd60f7eb2039bdeccab2dfd879f045bd11fb9fd'
            'c004d8c5c7c803ff42393bb43d022c7fe1c4a25d1f78a841de8df7ea255d4862')

prepare() {
  cd $pkgname-$pkgver
  
  # Use themed icon
  patch -Np1 -i ../use-themed-icon.patch

  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-unity
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
